﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Xml.Serialization;
using UnityEngine;

namespace XUtliPoolLib
{
	// Token: 0x020001F8 RID: 504
	[Serializable]
	public class XSkillData
	{
		// Token: 0x06000BEA RID: 3050 RVA: 0x0003E095 File Offset: 0x0003C295
		public XSkillData()
		{
			this.TypeToken = 1;
			this.NeedTarget = true;
			this.BackTowardsDecline = 0.75f;
			this.CameraTurnBack = 1f;
			this.CoolDown = 1f;
		}

		// Token: 0x06000BEB RID: 3051 RVA: 0x0003E0D8 File Offset: 0x0003C2D8
		public static XSkillData PreLoadSkillForTemp(string skillprefix, string name, bool force = false)
		{
			XSkillData data = XSingleton<XResourceLoaderMgr>.singleton.GetData<XSkillData>(skillprefix + name, ".txt");
			data.Prefix = skillprefix;
			bool flag = Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.OSXEditor || force;
			if (flag)
			{
				XSkillData.PreLoadSkillResEx(data, 1);
			}
			else
			{
				XSkillData.PreLoadSkillRes(data, 1);
			}
			return data;
		}

		// Token: 0x06000BEC RID: 3052 RVA: 0x0003E138 File Offset: 0x0003C338
		public static void PreLoadSkillRes(XSkillData data, int count)
		{
			bool flag = !string.IsNullOrEmpty(data.ClipName);
			if (flag)
			{
				XSingleton<XResourceLoaderMgr>.singleton.GetXAnimation(data.ClipName, true, false);
			}
			bool flag2 = data.Fx != null;
			if (flag2)
			{
				for (int i = 0; i < data.Fx.Count; i++)
				{
					XSingleton<XResourceLoaderMgr>.singleton.CreateInAdvance(data.Fx[i].Fx, count, ECreateHideType.DisableParticleRenderer);
				}
			}
			bool flag3 = data.Result != null;
			if (flag3)
			{
				for (int j = 0; j < data.Result.Count; j++)
				{
					bool longAttackEffect = data.Result[j].LongAttackEffect;
					if (longAttackEffect)
					{
						XSingleton<XResourceLoaderMgr>.singleton.CreateInAdvance(data.Result[j].LongAttackData.End_Fx, count, ECreateHideType.DisableParticleRenderer);
						XSingleton<XResourceLoaderMgr>.singleton.CreateInAdvance(data.Result[j].LongAttackData.Prefab, count, ECreateHideType.DisableParticleRenderer);
					}
				}
			}
		}

		// Token: 0x06000BED RID: 3053 RVA: 0x0003E24C File Offset: 0x0003C44C
		public static void PreLoadSkillResEx(XSkillData data, int count)
		{
			bool flag = !string.IsNullOrEmpty(data.ClipName);
			if (flag)
			{
				XSingleton<XResourceLoaderMgr>.singleton.GetXAnimation(data.ClipName, true, false);
				bool multipleAttackSupported = data.MultipleAttackSupported;
				if (multipleAttackSupported)
				{
					XSingleton<XResourceLoaderMgr>.singleton.GetXAnimation(data.ClipName + "_right_forward", true, false);
					XSingleton<XResourceLoaderMgr>.singleton.GetXAnimation(data.ClipName + "_right", true, false);
					XSingleton<XResourceLoaderMgr>.singleton.GetXAnimation(data.ClipName + "_right_back", true, false);
					XSingleton<XResourceLoaderMgr>.singleton.GetXAnimation(data.ClipName + "_left_forward", true, false);
					XSingleton<XResourceLoaderMgr>.singleton.GetXAnimation(data.ClipName + "_left", true, false);
					XSingleton<XResourceLoaderMgr>.singleton.GetXAnimation(data.ClipName + "_left_back", true, false);
					XSingleton<XResourceLoaderMgr>.singleton.GetXAnimation(data.ClipName + "_back", true, false);
				}
			}
			bool flag2 = data.Fx != null;
			if (flag2)
			{
				for (int i = 0; i < data.Fx.Count; i++)
				{
					XSingleton<XResourceLoaderMgr>.singleton.CreateInAdvance(data.Fx[i].Fx, count, ECreateHideType.DisableParticleRenderer);
				}
			}
			bool flag3 = data.Hit != null && data.Hit.Count > 0;
			if (flag3)
			{
				XSingleton<XResourceLoaderMgr>.singleton.CreateInAdvance(data.Hit[0].Fx, 1, ECreateHideType.DisableParticleRenderer);
			}
			bool flag4 = data.Warning != null;
			if (flag4)
			{
				for (int j = 0; j < data.Warning.Count; j++)
				{
					XSingleton<XResourceLoaderMgr>.singleton.CreateInAdvance(data.Warning[j].Fx, count, ECreateHideType.DisableParticleRenderer);
				}
			}
			bool flag5 = data.Result != null;
			if (flag5)
			{
				for (int k = 0; k < data.Result.Count; k++)
				{
					bool longAttackEffect = data.Result[k].LongAttackEffect;
					if (longAttackEffect)
					{
						XSingleton<XResourceLoaderMgr>.singleton.CreateInAdvance(data.Result[k].LongAttackData.End_Fx, count, ECreateHideType.DisableParticleRenderer);
						XSingleton<XResourceLoaderMgr>.singleton.CreateInAdvance(data.Result[k].LongAttackData.Prefab, count, ECreateHideType.DisableParticleRenderer);
					}
				}
			}
			bool flag6 = data.CameraMotion != null && !string.IsNullOrEmpty(data.CameraMotion.Motion);
			if (flag6)
			{
				XSingleton<XResourceLoaderMgr>.singleton.GetXAnimation(data.CameraMotion.Motion, true, false);
			}
		}

		// Token: 0x04000605 RID: 1541
		public static readonly string[] Skills = new string[]
		{
			"XJAComboSkill",
			"XArtsSkill",
			"XUltraSkill",
			"XCombinedSkill"
		};

		// Token: 0x04000606 RID: 1542
		public static readonly string[] JA_Command = new string[]
		{
			"ToSkill",
			"ToJA_1_0",
			"ToJA_2_0",
			"ToJA_3_0",
			"ToJA_4_0",
			"ToJA_0_1",
			"ToJA_0_2",
			"ToJA_1_1",
			"ToJA_1_2",
			"ToJA_2_1",
			"ToJA_2_2",
			"ToJA_3_1",
			"ToJA_3_2",
			"ToJA_4_1",
			"ToJA_4_2",
			"ToJA_QTE"
		};

		// Token: 0x04000607 RID: 1543
		public static readonly string[] Combined_Command = new string[]
		{
			"ToPhase",
			"ToPhase1",
			"ToPhase2",
			"ToPhase3",
			"ToPhase4",
			"ToPhase5",
			"ToPhase6",
			"ToPhase7",
			"ToPhase8",
			"ToPhase9"
		};

		// Token: 0x04000608 RID: 1544
		public static readonly string[] JaOverrideMap = new string[]
		{
			"A",
			"AA",
			"AAA",
			"AAAA",
			"AAAAA",
			"AB",
			"ABB",
			"AAB",
			"AABB",
			"AAAB",
			"AAABB",
			"AAAAB",
			"AAAABB",
			"AAAAAB",
			"AAAAABB",
			"QTE"
		};

		// Token: 0x04000609 RID: 1545
		public static readonly string[] CombinedOverrideMap = new string[]
		{
			"Phase0",
			"Phase1",
			"Phase2",
			"Phase3",
			"Phase4",
			"Phase5",
			"Phase6",
			"Phase7",
			"Phase8",
			"Phase9"
		};

		// Token: 0x0400060A RID: 1546
		public static readonly string[] MultipleAttackOverrideMap = new string[]
		{
			"Forward",
			"RightForward",
			"Right",
			"RightBack",
			"LeftForward",
			"Left",
			"LeftBack",
			"Back"
		};

		// Token: 0x0400060B RID: 1547
		[XmlIgnore]
		public string Prefix = null;

		// Token: 0x0400060C RID: 1548
		[SerializeField]
		public string Name;

		// Token: 0x0400060D RID: 1549
		[SerializeField]
		[DefaultValue(1)]
		public int TypeToken;

		// Token: 0x0400060E RID: 1550
		[SerializeField]
		public string ClipName;

		// Token: 0x0400060F RID: 1551
		[SerializeField]
		[DefaultValue(0)]
		public int SkillPosition;

		// Token: 0x04000610 RID: 1552
		[SerializeField]
		[DefaultValue(false)]
		public bool IgnoreCollision;

		// Token: 0x04000611 RID: 1553
		[SerializeField]
		[DefaultValue(true)]
		public bool NeedTarget;

		// Token: 0x04000612 RID: 1554
		[SerializeField]
		[DefaultValue(false)]
		public bool OnceOnly;

		// Token: 0x04000613 RID: 1555
		[SerializeField]
		[DefaultValue(false)]
		public bool ForCombinedOnly;

		// Token: 0x04000614 RID: 1556
		[SerializeField]
		[DefaultValue(false)]
		public bool MultipleAttackSupported;

		// Token: 0x04000615 RID: 1557
		[SerializeField]
		[DefaultValue(0.75f)]
		public float BackTowardsDecline;

		// Token: 0x04000616 RID: 1558
		[SerializeField]
		public string PVP_Script_Name;

		// Token: 0x04000617 RID: 1559
		[SerializeField]
		public List<XResultData> Result;

		// Token: 0x04000618 RID: 1560
		[SerializeField]
		public List<XChargeData> Charge;

		// Token: 0x04000619 RID: 1561
		[SerializeField]
		public List<XJAData> Ja;

		// Token: 0x0400061A RID: 1562
		[SerializeField]
		public List<XHitData> Hit;

		// Token: 0x0400061B RID: 1563
		[SerializeField]
		public List<XManipulationData> Manipulation;

		// Token: 0x0400061C RID: 1564
		[SerializeField]
		public List<XFxData> Fx;

		// Token: 0x0400061D RID: 1565
		[SerializeField]
		public List<XAudioData> Audio;

		// Token: 0x0400061E RID: 1566
		[SerializeField]
		public List<XCameraEffectData> CameraEffect;

		// Token: 0x0400061F RID: 1567
		[SerializeField]
		public List<XWarningData> Warning;

		// Token: 0x04000620 RID: 1568
		[SerializeField]
		public List<XCombinedData> Combined;

		// Token: 0x04000621 RID: 1569
		[SerializeField]
		public List<XMobUnitData> Mob;

		// Token: 0x04000622 RID: 1570
		[SerializeField]
		public XScriptData Script;

		// Token: 0x04000623 RID: 1571
		[SerializeField]
		public XLogicalData Logical;

		// Token: 0x04000624 RID: 1572
		[SerializeField]
		public XCameraMotionData CameraMotion;

		// Token: 0x04000625 RID: 1573
		[SerializeField]
		public XCameraPostEffectData CameraPostEffect;

		// Token: 0x04000626 RID: 1574
		[SerializeField]
		public XCastChain Chain;

		// Token: 0x04000627 RID: 1575
		[SerializeField]
		[DefaultValue(1f)]
		public float CoolDown;

		// Token: 0x04000628 RID: 1576
		[SerializeField]
		[DefaultValue(0f)]
		public float Time;

		// Token: 0x04000629 RID: 1577
		[SerializeField]
		[DefaultValue(false)]
		public bool Cast_Range_Rect;

		// Token: 0x0400062A RID: 1578
		[SerializeField]
		[DefaultValue(0f)]
		public float Cast_Range_Upper;

		// Token: 0x0400062B RID: 1579
		[SerializeField]
		[DefaultValue(0f)]
		public float Cast_Range_Lower;

		// Token: 0x0400062C RID: 1580
		[SerializeField]
		[DefaultValue(0f)]
		public float Cast_Offset_X;

		// Token: 0x0400062D RID: 1581
		[SerializeField]
		[DefaultValue(0f)]
		public float Cast_Offset_Z;

		// Token: 0x0400062E RID: 1582
		[SerializeField]
		[DefaultValue(0f)]
		public float Cast_Scope;

		// Token: 0x0400062F RID: 1583
		[SerializeField]
		[DefaultValue(0f)]
		public float Cast_Scope_Shift;

		// Token: 0x04000630 RID: 1584
		[SerializeField]
		[DefaultValue(1f)]
		public float CameraTurnBack;

		// Token: 0x04000631 RID: 1585
		public static bool PreLoad = false;
	}
}
